<div class="hidden">
    <div id="simexpression_form" class="modal">
        <div class="modal_header">
            <strong>Add Instruction</strong>
        </div>
        <div class="clear"></div>
        <div class="modal_form">
            <input type="hidden" id="insert_pos" value="0"/>
            <div id="itype" class="input_box">
                <label>Type:</label>
                <span class="helptext">Choose type of the instruction</span>
                <select name="itype">
                    <option value="undefined" selected="selected" >select</option>
                    <option value="treatment">treatment</option>
                    <option value="runtimesteps">runtimesteps</option>
                    <option value="knockout">knockout</option>
                    <option value="overexpress">overexpress</option>
                    <option value="setproduct">setproduct</option>
                    <option value="invocation"
                            {% if not request.session.sgx_program.sgx.procedure_defs %}
                            disabled="disabled"
                            {% endif %}
                            >invocation</option>
                    <option value="foreach">foreach</option>
                </select>
            </div>

            <div id="treatment" class="input_box">
                <label for="treatment_factor" >Factor:</label>
                <span class="helptext">The factor which you want to do treatment on (enter factor name or choose from existing factor of preferred transsys program) </span>
                <select id="treatment_factor" name="treatment_factor" class="editable-select">
                    <option value="" selected="selected" >factor name</option>
                    {% for tp in request.session.sgx_program.target_tp %}
                    {% for f in tp.factor_list %}
                    <option value="{{f.name}}">{{f.name}}</option>
                    {% endfor %}
                    {% endfor %}
                </select>
            </div>
            <div id="expr" class="input_box">
                <label>Expression level:</label>
                <span class="helptext">Set the expression level for the treatment</span>
                <input type="text" name="expr" /><br />
            </div>

            <div id="timestep" class="input_box">
                <label>Time steps:</label>
                <span class="helptext">Enter number of time steps</span>
                <input type="text" name="timestep" /><br />
            </div>
            <div id="knockout" class="input_box">
                <label>Gene:</label>
                <span class="helptext">The gene which you want to knockout (enter factor name or choose from existing factor of preferred transsys program)</span>
                <select id="knockout_gene" name="knockout_gene" class="editable-select">
                    <option value="" selected="selected" >gene name</option>
                    {% for tp in request.session.sgx_program.target_tp %}
                    {% for g in tp.gene_list %}
                    <option value="{{g.name}}">{{g.name}}</option>
                    {% endfor %}
                    {% endfor %}
                </select>
            </div>

            <div id="overexpress">
                <div  class="input_box">
                    <label for="overexpress_factor" >Factor:</label>
                    <span class="helptext">The factor encoding the gene that you want to insert (enter factor name or choose from existing factor of preferred transsys program) </span>
                    <select id="overexpress_factor" name="overexpress_factor" class="editable-select">
                        <option value="" selected="selected" >factor name</option>
                        {% for tp in request.session.sgx_program.target_tp %}
                        {% for f in tp.factor_list %}
                        <option value="{{f.name}}">{{f.name}}</option>
                        {% endfor %}
                        {% endfor %}
                    </select>
                </div>
                <div id="overexpress_expr" class="input_box">
                    <label>Constitute value:</label>
                    <span class="helptext">The rate that the gene expresses at</span>
                    <input type="text" name="overexpress_expr" /><br />
                </div>
            </div>
            <div id="setproduct">
                <div id="gene" class="input_box">
                    <label>Gene:</label>
                    <span class="helptext">The gene which you want to set product (enter gene name or choose from existing gene of preferred transsys program)</span>
                    <select id="setproduct_gene" name="setproduct_gene" class="editable-select">
                        <option value="" selected="selected" >gene name</option>
                        {% for tp in request.session.sgx_program.target_tp %}
                        {% for g in tp.gene_list %}
                        <option value="{{g.name}}">{{g.name}}</option>
                        {% endfor %}
                        {% endfor %}
                    </select>
                </div>
                <div id="factor" class="input_box">
                    <label>Factor:</label>
                    <span class="helptext">The factor encoding gene product (enter factor name or choose from existing factor of preferred transsys program)</span>
                    <select id="setproduct_factor" name="setproduct_factor" class="editable-select">
                        <option value="" selected="selected" >factor name</option>
                        {% for tp in request.session.sgx_program.target_tp %}
                        {% for f in tp.factor_list %}
                        <option value="{{f.name}}">{{f.name}}</option>
                        {% endfor %}
                        {% endfor %}
                    </select>
                </div>
            </div>

            <div id="invocation" class="input_box">
                <label>Procedure:</label>
                <span class="helptext">Choose the procedure</span>
                <select id="invocation_procedure" name="invocation_procedure">
                    <option value="undefined" selected="selected" >select</option>
                    {% for p in request.session.sgx_program.sgx.procedure_defs %}
                    <option value="{{p.procedure_name}}">{{p.procedure_name}}</option>
                    {% endfor %}
                </select>
            </div>

            <div id="foreach" class="input_box">
                <label for="foreach_procedures" >Procedures:</label>
                <span class="helptext"> Choose the procedures</span>
                <select id="foreach_procedures" name="foreach_procedures" multiple="multiple">
                    {% for p in request.session.sgx_program.sgx.procedure_defs %}
                    <option value="{{p.procedure_name}}">{{p.procedure_name}}</option>
                    {% endfor %}
                </select>
            </div>
            <div id="control" class="input_box">
                <button id="next">Save & Next</button>
                <button id="ok">Finish</button>
                <!--<button id="cancel">Cancel</button>-->
            </div>
        </div>
    </div>
</div>